﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div align="center">
    <table  width="300" height="194" class="table" >
        <tr>
            <th></th>
        </tr>
        <tr>
            <td>请输入密钥:<input id="key"/></td>
        </tr>
        <tr>
            <td><input type="button" value="解冻" onclick="btn_Click()" />&nbsp;<input type="button" value="获取密钥" onclick="btn_GetKey(this)"/></td>
        </tr>
    </table>
    <div style="display:none;"><%=ViewData["msg"] %></div>
    <script type="text/javascript">

        function btn_Click() {
            if (key.value == '') {
                alert('请输入密钥');
                return false;
            }
            getJSON('<%=Url.Action("GetMoney") %>', { key: key.value }, function (result) {
                if (result.msg.length)
                    alert(result.msg);
                if (result.count > 0) {
                    $('#lblFreezMoney').show();
                    $('#lblGetMoney').hide();
                    location.href = location.href;
                }
            });
        }
        function btn_GetKey(obj) {
            GetDiv(obj);
        }
    </script>
    <style type="text/css">
        input #key{ width:300px;}
    </style>
</div>
